package com.shiyi.sqlSession;

import com.shiyi.pojo.Configration;
import com.shiyi.pojo.MappedStatement;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @Author: 十一
 * @Date: 2020/11/9 15:04
 * @Descrption
 **/
public interface Excutor {

    public <T> List<T> query(Configration configration, MappedStatement mappedStatement, Object... params) throws SQLException, ClassNotFoundException, NoSuchFieldException, IllegalAccessException, InstantiationException, IntrospectionException, InvocationTargetException;

    public <T> T insert(Configration configration, MappedStatement mappedStatement, Object... params) throws ClassNotFoundException, SQLException, NoSuchFieldException, IllegalAccessException;

    public <T> T update(Configration configration, MappedStatement mappedStatement, Object... params) throws ClassNotFoundException, SQLException, IllegalAccessException, NoSuchFieldException;

    public <T> T delete(Configration configration, MappedStatement mappedStatement, Object... params) throws ClassNotFoundException, SQLException, IllegalAccessException, NoSuchFieldException;
}
